package cs2340.spring2012.droidception.toDo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class RegisterActivity extends Activity implements OnClickListener {
	Button register;
	Button cancel;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.register);
        register = (Button)findViewById(R.id.button3);
        cancel = (Button)findViewById(R.id.button4);
        register.setOnClickListener(this);
        cancel.setOnClickListener(this);
    }

	@Override
	public void onClick(View v) {
		
		if(v.getId() == (register.getId())) {
				setContentView(R.layout.success);
		}
		
		else {
			if (v.getId() == (cancel.getId())){
				Intent i = new Intent();                 
				i.setClassName("cs2340.spring2012.droidception.toDo", "cs2340.spring2012.droidception.toDo.LoginActivity");                 
				startActivity(i);
			}
		}
	}
}